package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MesStockMapper;
import com.ruoyi.system.domain.MesStock;
import com.ruoyi.system.service.IMesStockService;

/**
 * 库存Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-01
 */
@Service
public class MesStockServiceImpl implements IMesStockService 
{
    @Autowired
    private MesStockMapper mesStockMapper;

    /**
     * 查询库存
     * 
     * @param id 库存主键
     * @return 库存
     */
    @Override
    public MesStock selectMesStockById(Integer id)
    {
        return mesStockMapper.selectMesStockById(id);
    }

    /**
     * 查询库存列表
     * 
     * @param mesStock 库存
     * @return 库存
     */
    @Override
    public List<MesStock> selectMesStockList(MesStock mesStock)
    {
        return mesStockMapper.selectMesStockList(mesStock);
    }

    /**
     * 新增库存
     * 
     * @param mesStock 库存
     * @return 结果
     */
    @Override
    public int insertMesStock(MesStock mesStock)
    {
        return mesStockMapper.insertMesStock(mesStock);
    }

    /**
     * 修改库存
     * 
     * @param mesStock 库存
     * @return 结果
     */
    @Override
    public int updateMesStock(MesStock mesStock)
    {
        return mesStockMapper.updateMesStock(mesStock);
    }

    /**
     * 批量删除库存
     * 
     * @param ids 需要删除的库存主键
     * @return 结果
     */
    @Override
    public int deleteMesStockByIds(Integer[] ids)
    {
        return mesStockMapper.deleteMesStockByIds(ids);
    }

    /**
     * 删除库存信息
     * 
     * @param id 库存主键
     * @return 结果
     */
    @Override
    public int deleteMesStockById(Integer id)
    {
        return mesStockMapper.deleteMesStockById(id);
    }
}
